{{ $innerHTML  := .innerHTML }}
{{ $hrefAttr   := .href   | default "" }}
{{ $titleAttr  := .title  | default "" }}
{{ $classAttr  := .class  | default "" }}
{{ $relAttr    := .rel    | default "" }}
{{ $targetAttr := .target | default "_blank" }}


{{ $class  := printf " class=%q"  $classAttr  | safeHTMLAttr }}
{{ $title  := printf " title=%s"  $titleAttr  | safeHTMLAttr }}
{{ $href   := printf " href=%s"   $hrefAttr   | safeHTMLAttr }}
{{ $rel    := printf " rel=%s"    $relAttr    | safeHTMLAttr }}
{{ $target := printf " target=%s" $targetAttr | safeHTMLAttr }}


{{ $a := printf "<a%s%s%s%s%s>%s</a>" $class $href $target $rel $title $innerHTML | safeHTML }}
{{ return $a }}